#!/bin/bash

max=5
sum=0

timelen=$1
add() {
	while (($sum < $max))
	do
		sum=$((${sum} + 1))
		sleep $timelen
		echo "sum = $sum" >> test.log
	done
}

add
